#ifndef __SPLITTOOLCPPJIEBA_H_
#define __SPLITTOOLCPPJIEBA_H_
#include "../../libs/cppjieba/Jieba.hpp"
#include <string>
#include <vector>

using std::vector;
using std::string;
using cppjieba::Jieba;

const char* const DICT_PATH = "/home/shen/Documents/spellCorrect/libs/cppjieba/dict/jieba.dict.utf8";      //最大概率法(MPSegment: Max Probability)分词所使用的词典路径
const char* const HMM_PATH = "/home/shen/Documents/spellCorrect/libs/cppjieba/dict/hmm_model.utf8";        //隐式马尔科夫模型(HMMSegment: Hidden Markov Model)分词所使用的词典路径
const char* const USER_DICT_PATH = "/home/shen/Documents/spellCorrect/libs/cppjieba/dict/user.dict.utf8";  //用户自定义词典路径
const char* const IDF_PATH = "/home/shen/Documents/spellCorrect/libs/cppjieba/dict/idf.utf8";              //IDF路径
const char* const STOP_WORD_PATH = "/home/shen/Documents/spellCorrect/libs/cppjieba/dict/stop_words.utf8"; //停用词路径

namespace SC
{
    class SplitToolCppJieba
    {
    public:
        SplitToolCppJieba()
        : _jieba(DICT_PATH, HMM_PATH, USER_DICT_PATH, IDF_PATH, STOP_WORD_PATH)
        {}
        
        vector<string> cut(const string & sentence)
        {
            vector<string> words;
            _jieba.CutAll(sentence, words);

            return words;
        }

    private:
        cppjieba::Jieba _jieba;
    };
}
#endif